package com.quick.druid.config;

import org.apache.zookeeper.Watcher;
import org.apache.zookeeper.ZooKeeper;
import org.springframework.stereotype.Component;

import java.io.IOException;

@Component
public class ZookeeperServer {
    private ZooKeeper zk;

    public ZooKeeper getConnection(String host, Watcher watcher) throws IOException {
        zk = new ZooKeeper(host, 500, watcher);
        return zk;
    }

}